<?php
	header("Content-type: text/plain; charset=utf-8");
	header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
	header("Cache-Control: no-store, no-cache, must-revalidate");
	header("Cache-Control: post-check=0, pre-check=0", false);
	header("Pragma: no-cache");
	if (isset($_GET["q"])) {
    $q=explode(' ',$_GET["q"]);
    $data=get_php_data("http://ivctrans.by/all/getdata.php?PHPSESSID=0&prog=station1&host=1&q=".$q[0]);
		print $data."\n";
	}
// ----------------------------------------------------------------
	function get_php_data($url) {
		$get=curl_init();
		curl_setopt($get,CURLOPT_URL,$url); 
		curl_setopt($get,CURLOPT_FOLLOWLOCATION,1);
		curl_setopt($get,CURLOPT_RETURNTRANSFER,1);
		curl_setopt($get,CURLOPT_TIMEOUT,60);
		$answer=curl_exec($get);
		curl_close($get);
		return $answer;
	}
?>